
__kernel void Kernel2(__global int* g_graph_mask, __global int* g_updating_graph_mask,
					  __global int* g_graph_visited, __global int* g_over, __const int no_of_nodes)
{
	int tid = get_global_id(0);	
	//g_graph_mask[tid] = 1;
	if ( tid < no_of_nodes && (1 == g_updating_graph_mask[tid])) {
		g_graph_mask[tid] = 1;
		g_graph_visited[tid] = 1;
		*g_over = 1;
		g_updating_graph_mask[tid] = 0;
	}
}